<?php

declare(strict_types=1);

namespace Imi\Test\Component\Model;

use Imi\Model\Annotation\Column;
use Imi\Model\Annotation\Entity;
use Imi\Model\Annotation\RedisEntity;
use Imi\Model\RedisModel;

/**
 * Test.
 */
#[Entity]
#[RedisEntity(key: 'imi:redisModel:typeColumn', storage: \Imi\Model\Enum\RedisStorageMode::HASH_OBJECT)]
class TestRedisHashObjectColumnTypeModel extends RedisModel
{
    #[Column(type: 'json')]
    protected array $json = [];

    public function getJson(): array
    {
        return $this->json;
    }

    public function setJson(array $json): self
    {
        $this->json = $json;

        return $this;
    }

    #[Column(type: 'json')]
    protected array $jsonArray = [];

    public function getJsonArray(): array
    {
        return $this->jsonArray;
    }

    public function setJsonArray(array $jsonArray): self
    {
        $this->jsonArray = $jsonArray;

        return $this;
    }

    #[Column(type: 'list', listSeparator: ',')]
    protected array $list = [];

    public function getList(): array
    {
        return $this->list;
    }

    public function setList(array $list): self
    {
        $this->list = $list;

        return $this;
    }

    #[Column(type: 'set')]
    protected array $set = [];

    public function getSet(): array
    {
        return $this->set;
    }

    public function setSet(array $set): self
    {
        $this->set = $set;

        return $this;
    }
}
